package main

import (
	"fmt"
)

func main(){
	// var i int32 = 100
	// var n1 float32 = float32(i)
	// var n2 int8 = int8(i)
	// var n3 int64 = int64(i)  // 低精度转高精度
	// fmt.Printf("i=%v n1 = %v n2 = %v n3 = %v \n",i, n1, n2, n3)
	// // 被转换的变量，本身类型不发生改变
	// fmt.Printf("i type is %T \n",i) //int32

	var n1 int32 = 12
	// var n3 int8
	var n4 int8
	n4 = int8(n1) + 127 //-117
	// n3 = int8(n1) + 128 //  编译不过.\main5.go:20:16: constant 128 overflows int8
	fmt.Println("n4=",n4)
	

}